package com.education.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("system_email_log")
public class SystemEmailLog {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String sender;
    private String recipient;
    private String subject;

    @TableField("content")
    private String content;

    @TableField("is_html")
    private Boolean html;

    @TableField("send_time")
    private LocalDateTime sendTime;

    private String status; // PENDING, SUCCESS, FAILED

    @TableField("error_message")
    private String errorMessage;

    @TableField(exist = false)
    private List<SystemEmailAttachment> attachments;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
